﻿@model Package
@{
    Layout = "~/Views/Shared/_Dashboard.cshtml";
}
@UIHelper.ImageTitle(Html.Global( "SaveAs_SaveAsNewTheme"), Html.Global( "SaveAs_SaveAsNewThemeDesc"))
@UIHelper.SectionHeader(Html.Global("PackageForm_Information"))
<style>
    .file-upload-buttons { padding: 5px 0px; }
</style>
@using (Html.BeginForm("SaveAs", "Theme", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary()
    Html.RenderPartial("_PackageForm", Model); 
    <p>
        @(Ajax.Dna().Checkbox("ReplaceIfExists", Html.Global("SaveAs_ReplaceSameNameTheme"), true,
                           Url.Content("~/content/images/icon_accept_16.png"),
                           Url.Content("~/content/images/icon_block_16.png"))
                           .Options(opts =>
                           {
                               opts.OnStateChanged = "if (value) { $('#TargetRow').show();$('#ParentPageRow').show();}else{$('#TargetRow').hide(); $('#ParentPageRow').hide(); }";
                           })
                           .GetHtml()
                    )
    </p>
    <hr />
    <div id="d_buttons" style="padding: 10px; text-align: center;">
        @{ Ajax.Dna().Button("btnSaveAs")
                               .LocText("RES_EXPORT")
                               .Submit()
                               .ImageIcons(Url.Content("~/content/images/icon_download_16.gif"))
                               .Render();
        }
    </div>
}